package com.jwsoft.manager.core.gateway.controller.bigScreen;

import com.bifang.engine.assistant.core.domain.AppResponse;
import com.bifang.engine.protect.core.annotation.NoSignCrypto;
import com.jwsoft.manager.common.vo.bigScreen.analysisXq.SchoolOverviewXqQueryVO;
import com.jwsoft.manager.common.vo.bigScreen.analysisXq.SchoolOverviewXqVO;
import com.jwsoft.manager.common.vo.bigScreen.analysisYbm.*;
import com.jwsoft.manager.common.vo.eduSjtj02.EduSjtj02RankVO;
import com.jwsoft.manager.core.integration.bigScreen.AnalysisYbmIntegration;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/doc/api/ybm")
@Tag(name = "大屏预报名接口", description = "大屏预报名接口")
public class AnalysisYbmController {
    @Autowired
    private AnalysisYbmIntegration analysisYbmIntegration;

    @Operation(summary = "预报名总信息",description = "预报名总信息")
    @PostMapping(value = "/EduAnalysisYbm0001", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<YbmOverviewVO> getSchoolOverview(@RequestBody @Validated YbmOverviewQueryVO vo) {

        return AppResponse.successData(analysisYbmIntegration.getYbmOverView(vo));
    }
    @Operation(summary = "信息采集总览",description = "信息采集总览")
    @PostMapping(value = "/EduAnalysisYbm0002", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<InformationCollectionVO> getInformationCollection(@RequestBody @Validated YbmOverviewQueryVO vo) {

        return AppResponse.successData(analysisYbmIntegration.getInformationCollection(vo));
    }
    @Operation(summary = "核实协统数据使用情况",description = "核实协统数据使用情况")
    @PostMapping(value = "/EduAnalysisYbm0003", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<VerifyDataVO> getVerifyInfo(@RequestBody @Validated YbmOverviewQueryVO vo){

        return AppResponse.successData(analysisYbmIntegration.getVerifyInfo(vo));
    }
    @Operation(summary = "各类报名情况",description = "各类报名情况")
    @PostMapping(value = "/EduAnalysisYbm0004", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<KindOfApplyVO> getKindOfApplyInfo(@RequestBody @Validated YbmOverviewQueryVO vo){

        return AppResponse.successData(analysisYbmIntegration.getKindOfApplyInfo(vo));
    }
    @Operation(summary = "区县预报名排名",description = "区县预报名排名")
    @PostMapping(value = "/EduAnalysisYbm0005", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<List<EduSjtj02RankVO>> getAreaRankList(@RequestBody @Validated YbmOverviewQueryVO vo){

        return AppResponse.successData(analysisYbmIntegration.getAreaRankList(vo));
    }

    @Operation(summary = "学校预报名排名",description = "学校预报名排名")
    @PostMapping(value = "/EduAnalysisYbm0006", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<PreNameRankVO> getPreNameRankList(@RequestBody @Validated YbmOverviewQueryVO vo){

        return AppResponse.successData(analysisYbmIntegration.getPreNameRankList(vo));
    }
    @Operation(summary = "近五年预报名情况",description = "近五年预报名情况")
    @PostMapping(value = "/EduAnalysisYbm0007", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<Map<String,Object>> getPreNameRankInfo(@RequestBody @Validated SchoolQueryVO vo){

        return AppResponse.successData(analysisYbmIntegration.getFiveYearInfo(vo));
    }
}
